class Hero:
    hero_hp = 1000
    hero_power = 200
    hero_name="Hero"
    def fight(self,enemy_hp,enemy_power,enemy_name):
        """
        :param enemy_hp:敌人的血量，是整型
        :param enemy_power:敌人的攻击力，是整型
        :return:
        """
        hero_final_hp=self.hero_hp-enemy_power
        # 计算英雄的最终血量
        enemy_final_hp=enemy_hp-self.hero_power
        # 计算敌人的最终血量
        if hero_final_hp > enemy_final_hp:
            print(f"{self.hero_name}获胜")
        elif hero_final_hp == enemy_final_hp:
            print("平局")
        else:
            print(f"{enemy_name}获胜")

class Timo(Hero):
    hero_hp=980
    hero_power=210
    hero_name="Timo"

class Jinx(Hero):
    hero_hp=1080
    hero_power=180
    hero_name="Jinx"


if __name__ == "__main__":
    timo=Timo()
    jinx=Jinx()
    jinx.fight(timo.hero_hp,timo.hero_power,timo.hero_name)